#ifndef VCDUSBCOMMON_H
#define VCDUSBCOMMON_H

#include <glib.h>


#define VCD_MSG_DEFAULT 0
#define VCD_MSG_SHOW_SPICE_TOPBAR 1
#define VCD_MSG_SHOW_HIDE_TOPBAR  2
#define VCD_MSG_FULLSCREEN  3
#define VCD_MSG_RECONNECT  4



typedef struct  vcd_msg_header{
    int type;
    int length;
}VcdMsgHeader;

typedef struct  vcd_msg_topbar{
    VcdMsgHeader header;
    unsigned long  parent_window_xid;
}VcdMsgTopbar;

typedef void (*on_recved_msg_from_parent)(VcdMsgHeader* msg,gpointer vcd_usb_ctx);


typedef struct _vcd_usb_ctx{
    int parent_port;
    gpointer usb_rdir;
    gboolean is_use_spice_topbar;
    gpointer topbar_widget;
    gpointer io_channel;

    on_recved_msg_from_parent msg_callback;
}VcdUsbCtx;






#endif // VCDUSBCOMMON_H
